package xerr

// OK 成功返回
const (
	OK            uint32 = 200
	InternalError uint32 = 500
)

/**(前3位代表业务,后三位代表具体功能)**/

// ServerCommonError - 系统全局错误码
const (
	ServerCommonError             uint32 = 100001 // 服务器开小差啦,稍后再来试一试
	ServerRequestParamError       uint32 = 100002 // 参数错误
	ServerTokenExpireError        uint32 = 100003 // Token过期
	ServerTokenInvalidError       uint32 = 100004 // 无效Token
	ServerDbError                 uint32 = 100005 // 数据库繁忙,请稍后再试
	ServiceExceptionError         uint32 = 100006 // 服务异常
	ServerOperationExceptionError uint32 = 100007 // 操作失败
	ServerDataNotFoundError       uint32 = 100008 // 数据不存在
	ServerDataRepeatError         uint32 = 100009 // 数据重复(仅针对唯一取值)
)

// ServerAppError - APP相关业务错误码
const (
	ServerApiCaptchaError              uint32 = 200001 // 验证码不正确
	ServerApiInvalidPhoneError         uint32 = 200002 // 手机号格式不正确
	ServerApiIntegralNotEnoughError    uint32 = 200003 // 积分不足
	ServerApiInvalidWalletAddressError uint32 = 200004 // 无效钱包地址
	ServerApiVerificationPromptError   uint32 = 200005 // 防刷验证提示
)

// ServerAdminError - 全局业务错误码
const (
	ServerAdminAuthFailed        uint32 = 300001 // 登录验证失败
	ServerAdminUserNotExist      uint32 = 300002 // 用户不存在
	ServerAdminPasswordError     uint32 = 300003 // 账号或密码错误
	ServerAdminCaptchaError      uint32 = 300004 // 验证码错误
	ServerAdminAccountBanned     uint32 = 300005 // 账号已被封禁
	ServerAdminAccountDeleted    uint32 = 300006 // 账号已被删除
	ServerAdminSMSCodeError      uint32 = 300007 // 短信验证码错误
	ServerAdminPermissionDenied  uint32 = 300008 // 无权限
	ServerAdminUserNotLogin      uint32 = 300009 // 用户未登录
	ServerAdminUserPhoneHasExist uint32 = 300010 // 手机号已存在
	ServerAdminUserPhoneNotExist uint32 = 300011 // 手机号不存在
	ServerAdminRouterHasChild    uint32 = 300012 // 存在子菜单
)
